

#ifndef UC_GEPLANAR_H
#define UC_GEPLANAR_H

#include "zgesurf.h"
#include "zgevec3d.h"
#pragma pack (push, 8)

class UcGeLineSeg3d;
class UcGeLinearEnt3d;
class UcGeCircArc3d;

class
GE_DLLEXPIMPORT
UcGePlanarEnt : public UcGeSurface
{
public:

    ZSoft::Boolean  intersectWith    (const UcGeLinearEnt3d& linEnt, UcGePoint3d& pnt,
                                      const UcGeTol& tol = UcGeContext::gTol) const;

    UcGePoint3d     closestPointToLinearEnt (const UcGeLinearEnt3d& line,
                                             UcGePoint3d& pointOnLine,
                                             const UcGeTol& tol
                                               = UcGeContext::gTol) const;
    UcGePoint3d     closestPointToPlanarEnt (const UcGePlanarEnt& otherPln,
                                             UcGePoint3d& pointOnOtherPln,
                                             const UcGeTol& tol
                                               = UcGeContext::gTol) const;

    ZSoft::Boolean isParallelTo      (const UcGeLinearEnt3d& linEnt,
                                      const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isParallelTo      (const UcGePlanarEnt& otherPlnEnt,
                                      const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isPerpendicularTo (const UcGeLinearEnt3d& linEnt,
                                      const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean isPerpendicularTo (const UcGePlanarEnt& linEnt,
                                      const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean isCoplanarTo      (const UcGePlanarEnt& otherPlnEnt,
                                      const UcGeTol& tol = UcGeContext::gTol) const;

    void              get            (UcGePoint3d&, UcGeVector3d& uVec,
                                      UcGeVector3d& vVec) const;
    void              get            (UcGePoint3d&, UcGePoint3d& origin,
                                      UcGePoint3d&) const;

    UcGePoint3d    pointOnPlane      () const;
    UcGeVector3d   normal            () const;
    void           getCoefficients(double& a, double& b, double& c, double& d) const;
    void           getCoordSystem(UcGePoint3d& origin, UcGeVector3d& axis1,
                                  UcGeVector3d& axis2) const;

    UcGePlanarEnt& operator =        (const UcGePlanarEnt& src);

protected:
    UcGePlanarEnt ();
    UcGePlanarEnt (const UcGePlanarEnt&);
};

#pragma pack (pop)
#endif
